<extend name="zh_cn:Public:base" />
<block name="title">
    <title>美住 - 微预定设置 - 房型与价格</title>
</block>
<block name="extendHead">
    <link rel="stylesheet" type="text/css" href="/Public/dist/Home/common_control.css?rev=65393a524028c7e3b76e961a08059c7d4">
    <link rel="stylesheet" type="text/css" href="/Public/dist/Home/RoomSettingPage/index.css?rev=96cc16748ca0e50263980675fd3145eda">
    <link rel="stylesheet" type="text/css" href="/Public/jslib/cropper/2.3.0/cropper.min.css?rev=4cd5b78b4c0581196ff92a4a5b9c140d">
    <link rel="stylesheet" type="text/css" href="/Public/dist/Home/BookSettingPage/preview.css?rev=a4e20b88f8277e3379e355b3d7e577ca">
</block>
<block name="document">
    <div id="doc" class="container-above-md" data-time="{:strtotime(date('Y-m-d'))}">
        <include file="zh_cn:Public:Include_control_navbar" navbar-menu-setting="active" />
        <div id="doc-body" class="row">
            <include file="zh_cn:Public:Include_booking_tab" booking-tab-room="active" />
            <div id="doc-center">
                <div class="content-panel fixed-content" id="doc-form">
                    <div class="content-panel-header">
                        <div class="content-panel-title">房型设置</div>
                    </div>
                </div>
                <div class="row" id="roomContainer">
                </div>
                <form class="form-horizontal form-sm fixed-content hidden" id="refund-form" onkeydown="if(event.keyCode==13){return false;}">
                    <div class="content-panel">
                        <div class="content-panel-header">
                            <div class="content-panel-title">房费立减优惠</div>
                            <div class="col-xs-8" id="ImmediatelySwitchConatiner">
                                <div class="col-xs-2">
                                    <label class="switch ulite-js-switch ulite-js-ripple-effect" id="ImmediatelySwitch">
                                        <input type="checkbox" class="switch-input" />
                                        <span class="switch-label switch-label-sm"></span>
                                    </label>
                                </div>
                                <div class="col-xs-10">
                                    <div class="help-block"></div>
                                </div>
                            </div>
                        </div>
                        <div class="content-panel-body">
                            <div class="content-panel-help" id="ImmediatelySwitchHelp">如果打开此开关，会员可享受立减优惠，不享受会员折扣；否则，会员享受会员折扣，不参与立减优惠活动；会员不同时享用两种优惠。</div>
                        </div>
                    </div>                    
                    <div class="content-panel">
                        <div class="content-panel-header">
                            <div class="content-panel-title">房态开关设置</div>
                            <div class="col-xs-8" id="bookRoomSwitchConatiner">
                                <div class="col-xs-2">
                                    <label class="switch ulite-js-switch ulite-js-ripple-effect" id="bookRoomSwitch">
                                        <input type="checkbox" class="switch-input" checked/>
                                        <span class="switch-label switch-label-sm"></span>
                                    </label>
                                </div>
                                <div class="col-xs-10">
                                    <div class="help-block"></div>
                                </div>
                            </div>
                        </div>
                        <div class="content-panel-body">
                            <div class="content-panel-help" id="bookRoomSwitchHelp">如果打开此开关，预订端客人可选择具体房间，否则只能选择房型。</div>
                        </div>
                    </div>                    
                    <div class="content-panel">
                        <div class="content-panel-header">
                            <div class="content-panel-title">货币设置</div>
                            <div class="btn-raised btn-sm btn-primary addMultiCurrency">添加</div>
                            <div id="multiCurrencyModal" class="hidden">
                                <div class="modal-dialog modal-confirm" >
                                    <div class="modal-content">
                                        <div class="modal-header modal-header-member">
                                            <button type="button" class="btn close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                            <div class="modal-title">新增货币</div>
                                        </div>
                                        <div class="modal-body"> 
                                            <div class="multi-currency flex-direction-row">
                                                <div class="flex-1">
                                                    <div class="dropdown">
                                                        <ul class="dropdown-menu dropdown-menu-left">
                                                            <volist name="currencyInfo" id="currency">
                                                                <if condition="$key eq 0">
                                                                    <li class="active" data-value="{$currency.id}"><a href="javascript:void(0);">({$currency.standsymbol}) {$currency.name} . {$currency.symbol}</a></li>
                                                                    <else/>
                                                                    <li data-value="{$currency.id}"><a href="javascript:void(0);">({$currency.standsymbol}) {$currency.name} . {$currency.symbol}</a></li>
                                                                </if>                                                                
                                                            </volist>
                                                        </ul>
                                                        <a data-toggle="dropdown" class="without-min-width btn text-sm" data-value="{$currencyInfo[0].id}" href="javascript:void(0);"><span class="info">({$currencyInfo[0].standsymbol}) {$currencyInfo[0].name} . {$currencyInfo[0].symbol}</span><span class="icon-dropdown"></span></a>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="form-horizontal form-sm">
                                                <div class="form-group">
                                                    <div class="help-block"></div>
                                                    <div id="confirmCurrencyInfo">确认</div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>                            
                        </div>
                        <div class="content-panel-body">
                            <div class="content-panel-help" id="bookRoomSwitchHelp">微预定价格默认显示为人民币，如有设置其他货币，微预定用户浏览时可以切换不同币种查看对应的价格。</div>
                        </div>
                        <div class="tag-list clearfix" id="multiCurrencyContainer"></div>                        
                    </div>
                    <div class="content-panel">
                        <div class="content-panel-header">
                            <div class="content-panel-title">退订规则</div>
                        </div>
                        <div class="content-panel-body">
                        </div>
                    </div>
                    <div class="vertical-padding">
                        <div class="form-group">
                            <div class="col-xs-5">
                                <textarea type="text" class="form-control" maxlength="50" id="requestRefundDesc" placeholder="请输入退订规则"></textarea>
                            </div>
                            <div class="col-xs-7">
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </div>
                    <div class="content-panel">
                        <div class="content-panel-header">
                            <div class="content-panel-title">订单押金</div>
                        </div>
                        <div class="content-panel-body">
                        </div>
                    </div>
                    <div class="vertical-padding">
                        <div class="form-group">
                            <div class="col-xs-5">
                                <input type="text" class="form-control" maxlength="7" id="requestDeposit" placeholder="请输入订单押金" />
                            </div>
                            <div class="col-xs-7">
                                <div class="help-block"></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-xs-12">
                                <button type="submit" class="btn-primary btn-sm btn-raised" id="submitRefundDesc">确定</button>
                                <div class="help-block inline-help-block"></div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <!--end of doc-center-->
        </div>
        <!--end of doc body-->
    </div>
    <!--end of doc-->
    <include file="zh_cn:Public:Include_picture_cropper" />
    <!--房型图册模态框-->
    <div class="modal fade" data-backdrop="static" id="settingGalleryModal">
        <div class="modal-dialog sm-width">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <div class="modal-title">房型图册</span>
                    </div>
                </div>
                <div class="modal-body">
                    <div id="settingGalleryContainer" class="clearfix">
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--房型特色模态框-->
    <div class="modal fade" data-backdrop="static" id="settingDescModal">
        <div class="modal-dialog sm-width">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <div class="modal-title">房型特色</span>
                    </div>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal form-sm" onkeydown="if(event.keyCode==13){return false;}">
                        <div class="form-group">
                            <label class="col-xs-2 control-label">特色:</label>
                            <div class="col-xs-8">
                                <textarea type="text" style="height: 150px;" class="form-control" maxlength="100" id="requestDesc" placeholder="请输入描述"></textarea>
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-10 col-xs-offset-2">
                                <div class="help-block inline-help-block inline-help-block-right"></div>
                                <button type="button" class="btn-sm btn-primary btn-raised" id="submitDesc">确定</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--价格模态框-->
    <div class="modal fade" data-backdrop="static" id="settingPriceModal">
        <div class="modal-dialog sm-width">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <div class="modal-title">价格设置</span>
                    </div>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal form-sm" onkeydown="if(event.keyCode==13){return false;}">
                        <div class="form-group">
                            <label class="col-xs-3 control-label">价格:</label>
                            <div class="col-xs-5">
                                <input type="text" class="form-control" id="requestPrice" autocomplete="off" placeholder="单位（{$hotelDefaultSymbol}）" value="" />
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-10 col-xs-offset-2">
                                <div class="help-block inline-help-block inline-help-block-right"></div>
                                <button type="button" class="btn-sm btn-primary btn-raised" id="submitPrice">确定</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
     <!--按日历设置房型价格模态框-->
    <div class="modal fade" data-backdrop="static" id="price_calendar">
        <div class="modal-dialog sm-width">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <div class="modal-title price_calendar_title"></div>
                </div>
                <div class="modal-body">
                    <div class="modal-title discount_calendar_title"></div>
                    <table>
                        <tr>
                        <td class="calendar_wrap">
                            <table id="calendar_months">
                            </table>
                        </td>
                        <td class="calendar_wrap">
                            <table>
                                <thead class="calendar_header">
                                    <tr><th>星期一</th><th>星期二</th><th>星期三</th><th>星期四</th><th>星期五</th><th>星期六</th><th>星期日</th></tr>
                                </thead>
                                <tbody id="calendar_days"></tbody>
                            </table>
                        </td>
                        </tr>
                    </table>
                    <div class="discountsWayConatiner">
                        <div class="radioConatiner">
                            <label class="col-xs-2 control-label">房费立减优惠：</label>
                            <div class="col-xs-9"> 
                                <label style="margin-right: 16px;" class="radio ulite-js-radio ulite-js-ripple-effect">
                                    <input id="requestProportionWay" type="radio" class="radio-btn" name="requestWay" data-value="1" checked/>
                                    <span class="radio-label">按比例优惠</span>
                                </label>
                                <label  class="radio ulite-js-radio ulite-js-ripple-effect">
                                    <input id="requestSpecificWay" type="radio" class="radio-btn" name="requestWay" data-value="2" />
                                    <span class="radio-label">具体优惠金额</span>
                                </label>
                            </div>
                        </div>
                        <div class="radioConatiner">
                            <label class="col-xs-2 control-label"></label>
                            <div class="col-xs-3"> 
                                <input type="" class="form-control" name="" id="requestProportionWayValue" value="" placeholder="%"/>
                                <input type="" class="form-control hidden" name="" id="requestSpecificWayValue" value="" placeholder="{$hotelDefaultSymbol}0.00"/>
                            </div>
                            <div class="col-xs-2"> 
                                <button type="submit" class="btn-primary btn-sm btn-raised" id="radioWaySubmit">确定</button>
                            </div>
                        </div>
                        <div class="radioConatiner">
                            <div class="control-label col-xs-12 text-accent">说明：输入数字设置立减百分比或具体优惠金额，设置后从微预定下单该房型的每一份订单都可享受该优惠金额；仅适用于间夜房。</div>
                        </div>
                    </div>
                    <div class="discountsWayAlreadyConatiner hidden">
                        <div class="radioConatiner">
                            <label class="col-xs-2 control-label">房费立减优惠：</label>
                            <div class="col-xs-1 control-label" style="padding: 0;"><span class="discounts"></span></div>
                            <div class="col-xs-2"> 
                                <button type="submit" class="btn-primary btn-sm btn-raised" id="radioWayEditSubmit">修改</button>
                            </div>
                        </div>
                        <div class="radioConatiner">
                            <div class="control-label col-xs-12 text-accent">说明：输入数字设置立减百分比或具体优惠金额，设置后从微预定下单该房型的每一份订单都可享受该优惠金额；仅适用于间夜房。</div>
                        </div>
                    </div>                    
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <span>单击日期设置房价。</span><span class="err_info"></span>
                    </div>
                </div>
            </div>
        </div>
    </div>  
    <!-- 价格设置弹窗 -->
    <div class="modal fade" id="price_calendar_set">
        <div class="modal-dialog modal-sm">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal"><span>&times;</span></button>
                    <h4 class="modal-title">价格设置</h4>
                </div>
                <div class="modal-body">
                    <span>请输入价格：{$hotelDefaultSymbol}</span><input tabindex="0" class="price_input" id="price_input" type="text"/>
                </div>
                <div class="modal-footer">
                    <span id="set_price_info"></span>
                    <button id="set_price" type="button" class="btn-primary btn-raised ulite-js-btn ulite-js-ripple-effect">确定</button>
                </div>
            </div>
        </div>
    </div>
    <!--删除货币-->
    <div class="modal fade" id="multiCurrencyDeleteModal">
        <div class="modal-dialog modal-confirm">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <div class="modal-title">删除货币</div>
                </div>
                <div class="modal-body">您确定要删除吗？</div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-10 col-xs-offset-2">
                                <div class="help-block inline-help-block inline-help-block-right"></div>
                                <button type="button" class="btn-sm btn-primary btn-raised" id="submitCurrencyDelete">确定</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>  
    <!--js要用到的模板-->
    <script type="text/html" id="templateRoom">
        <div class="picture-with-setting">
            <div class="picture-container">
                <div class="picture absolute-shade hidden">
                    <div class="picture-re-upload text-sm text-accent absolute-shade text-center">修改图片
                    </div>
                </div>
                <a class="picuture-upload"><span class="glyphicon glyphicon-plus"></span></a>
            </div>
            <div class="picture-info">
                <label class="switch ulite-js-switch ulite-js-ripple-effect">
                    <input type="checkbox" class="switch-input" />
                    <span class="switch-label switch-label-sm" data-info-open="已打开" data-info-close="已关闭"></span>
                </label>
                <div class="picture-info-title-container">
                    <div class="picture-info-title"></div>
                </div>
            </div>
            <div class="picture-setting clearfix">
                <div class="col-xs-4 text-center">
                   <!-- <div class="btn-link setting-price">设置价格</div> -->
                   <div class="btn-link priceCalendar">分销价格</div>
                    <div class="discountGuidePage hidden">
                        <img src="/Public/uclbrt/image/discount-cn.png"/>
                        <div class="roger"></div>
                    </div>                   
                </div>
                <div class="col-xs-4 text-center">
                    <div class="btn-link setting-desc">房型特色</div>
                </div>
                <div class="col-xs-4 text-center">
                    <div class="btn-link setting-gallery">房型图册</div>
                </div>
            </div>
        </div>
    </script>
    <script type="text/html" id="templatePicture">
        <div class="picture-container picture-container-sm">
            <div class="picture absolute-shade hidden">
                <div class="picture-re-upload text-sm text-accent absolute-shade text-center">修改图片
                    <a class="picture-remove iconfont icon-remove"></a>
                </div>
            </div>
            <a class="picuture-upload"><span class="glyphicon glyphicon-plus"></span></a>
        </div>
    </script>
    <script type="text/html" id="templateaCurrency">
        <div class="tag-item">
            <div class="tag-item-inner">
                <div class="nowrap-content currency"></div>
                <span data-toggle="modal" data-target="#multiCurrencyDeleteModal" class="iconfont icon-minus text-accent deleteBtn hidden"></span>
            </div>
        </div>
    </script>     
    <include file="zh_cn:Public:Include_preview" />
</block>
<block name="extendFootJs">
    <script type="text/javascript" src="/Public/dist/Home/common_control.js?rev=b0ccaee5f3f00af011a31069395d22e4d"></script>
    <script type="text/javascript" src="/Public/jslib/cropper/2.3.0/cropper.min.js?rev=622bdc81acfb828b06e23a5ab59c315f"></script>
    <script type="text/javascript" src="/Public/jslib/canvas-to-blob/3.3.0/canvas-to-blob.min.js?rev=a0ad0191898c078a477dffe0aa7730e1"></script>
    <script type="text/javascript" src="/Public/dist/Home/BookSettingPage/cropper.js?rev=ac48069fd13c0949990004b8c59ef79f"></script>
    <script type="text/javascript" src="/Public/dist/Home/RoomSettingPage/index.js?rev=23a4805acfd6f1cee9f12bd87eb016e7d"></script>
    <script type="text/javascript" src="/Public/jslib/qrcode/jquery-qrcode.min.js"></script>
    <script type="text/javascript" src="/Public/jslib/html2canvas/html2canvas.min.js"></script>
    <script type="text/javascript" src="/Public/jslib/filesaver/filesaver.min.js"></script>
    <script type="text/javascript" src="/Public/dist/Home/BookSettingPage/preview.js?rev=8a4ed074795396ffb95bfa0f0f4d064f"></script>
    <script type="text/javascript" src="/Public/dist/Home/RoomPage/calendar.js"></script>
</block>
